package com.huawei.appmarket.service.appdetail.view.card;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.huawei.appgallery.jsonkit.api.JsonBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailAppInfoBean;
import java.util.List;
import o.azb;
import o.cep;
import o.drl;
import o.epw;
import o.ewm.h;
import o.ewm.j;

public class DetailAppInfoCard extends drl {
    private TextView ʻ;
    protected LayoutInflater ʼ;
    private TextView ʽ;
    private TextView ˊॱ;
    private TextView ˋॱ;
    private TextView ˏॱ;
    private TextView ͺ;
    private TextView ॱˊ;
    private TextView ॱˋ;
    private TextView ॱॱ;
    private TextView ॱᐝ;
    private TextView ᐝॱ;

    public DetailAppInfoCard() {
        this.ॱ = 302;
    }

    public View ˊ(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.ʼ = layoutInflater;
        this.ˊ = layoutInflater.inflate(h.ˊˊ, null);
        azb.ˏ(this.ˊ, j.ʾꜟ);
        azb.ॱ(this.ˊ, j.ˇ);
        this.ᐝॱ = (TextView) this.ˊ.findViewById(j.ʼﾞ);
        this.ʻ = (TextView) this.ˊ.findViewById(j.ˋﾟ);
        this.ॱॱ = (TextView) this.ˊ.findViewById(j.ˋˈ);
        this.ˏॱ = (TextView) this.ˊ.findViewById(j.ˋᐨ);
        this.ʽ = (TextView) this.ˊ.findViewById(j.ˋᶥ);
        this.ˊॱ = (TextView) this.ˊ.findViewById(j.ᐝˊ);
        this.ॱˊ = (TextView) this.ˊ.findViewById(j.ˉˈ);
        this.ͺ = (TextView) this.ˊ.findViewById(j.ʽߵ);
        this.ॱˋ = (TextView) this.ˊ.findViewById(j.ﹺˏ);
        this.ˋॱ = (TextView) this.ˊ.findViewById(j.ʿᐧ);
        this.ॱᐝ = (TextView) this.ˊ.findViewById(j.ᐠ);
        return this.ˊ;
    }

    public boolean ˊ(List<JsonBean> list) {
        if (list == null || list.size() <= 0) {
            return false;
        }
        DetailAppInfoBean detailAppInfoBean = (DetailAppInfoBean) list.get(0);
        if (detailAppInfoBean == null) {
            return false;
        }
        long ᐝˋ;
        ˊ(this.ॱˊ, this.ʻ, detailAppInfoBean.ˊ());
        ˊ(this.ˋॱ, this.ʽ, detailAppInfoBean.ॱ());
        if (detailAppInfoBean.ॱᶥ() == 1 && cep.ˏ() && detailAppInfoBean.ᐝˋ() > 0) {
            ᐝˋ = detailAppInfoBean.ᐝˋ();
        } else {
            ᐝˋ = detailAppInfoBean.ˉ();
        }
        if (ᐝˋ <= 0) {
            this.ॱॱ.setVisibility(8);
            this.ͺ.setVisibility(8);
        } else {
            this.ॱॱ.setText(epw.ˊ(ᐝˋ));
        }
        ˊ(this.ॱˋ, this.ˏॱ, detailAppInfoBean.ʽ());
        ˊ(this.ॱᐝ, this.ˊॱ, detailAppInfoBean.ꜟ());
        if (TextUtils.isEmpty(detailAppInfoBean.ꜞ())) {
            this.ᐝॱ.setVisibility(8);
        } else {
            this.ᐝॱ.setVisibility(0);
            this.ᐝॱ.setText(detailAppInfoBean.ꜞ());
        }
        return true;
    }

    private void ˊ(TextView textView, TextView textView2, String str) {
        if (TextUtils.isEmpty(str)) {
            textView.setVisibility(8);
            textView2.setVisibility(8);
            return;
        }
        textView2.setText(str);
    }
}
